#!/bin/bash


#设置有线网络访问内网服务器

sudo route add -net 192.168.0.121 netmask 255.255.255.255 gw 192.168.0.1 dev enx00e04c68164d
sudo route add -net 192.168.0.121 netmask 255.255.255.255 gw 192.168.0.1 dev enx00e04c68164d

#禁止有限 网络访问外网
sudo route del -net 0.0.0.0 netmask 0.0.0.0 dev enx00e04c68164d
sudo route del -net 192.168.0.0 netmask 255.255.255.0 dev enx00e04c68164d


sudo route del -net 192.168.1.0 netmask 255.255.255.0 dev enx00e04c68164d




sudo route del -net 0.0.0.0 netmask 0.0.0.0 dev enx00e04c68164d
sudo route del -net 192.168.0.0 netmask 255.255.255.0 dev enx00e04c68164d


sudo route del -net 192.168.1.0 netmask 255.255.255.0 dev enx00e04c68164d

#设置默认网关，所有数据优先从这里过
sudo route add default gw 192.168.0.1 dev wlp2s0
